package com.ssm.helong.shop.Dao;


import com.ssm.helong.shop.entity.OrderDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderDetailMapper {
    /**
     * 根据主键删除订单
     * @param orderDetailId
     * @return
     */
    int deleteByPrimaryKey(Integer orderDetailId);

    /**
     * 添加商品订单
     * @param orderDetail
     * @return
     */
    int addOrderDetail(OrderDetail orderDetail);



    /**
     * 根据订单id获取订单项列表
     * @param orderId
     * @return
     */
    List<OrderDetail> selectByOrderId(Integer orderId);

    /**
     * 修改商品订单信息
     * @param orderDetail
     * @return
     */
    int updateByPrimaryKey(OrderDetail orderDetail);
}
